//
//  Hongbao.m
//  FKGW
//
//  Created by song ce on 2017/3/1.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "Hongbao.h"
#import "UIView+Extend.h"
@implementation Hongbao

- (void)awakeFromNib {
    [super awakeFromNib];

    [self.hongBaojineLabel setAttributedText:[self changeLabelWithText:self.hongBaojineLabel.text]];
}

-(void)layoutSubviews{
    [super layoutSubviews];
    CGFloat with =Main_Screen_Width*0.8;
    CGFloat height = with*1.067;
    self.shopImageV.top = (28*height)/400;
    self.shaopNameLabel.top = (103*height)/400;
    self.hongBaojineLabel.top  =(160*height)/400;
}


- (IBAction)close:(id)sender {
    if(self.closeBlock){
        self.closeBlock();
    }
}

-(NSMutableAttributedString*) changeLabelWithText:(NSString*)needText
{
    NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:needText];
    UIFont *font = [UIFont systemFontOfSize:30];
    [attrString addAttribute:NSFontAttributeName value:font range:NSMakeRange(0,needText.length-2)];
    return attrString;
}



@end
